package praktikumid.w06.p2;

public abstract class Animal extends Organism {

	/**
	 * @param args
	 */
	private int noOfLegs;
	
	public int getNoOfLegs() {
		return this.noOfLegs;
	}
	
	public void setNoOfLegs(int noOfLegs) {
		if(noOfLegs >= 0) {
			this.noOfLegs = noOfLegs;
		}
		else
		{
			System.out.println("Must be positive number!");
		}
	}
	
	public void makeNoise() {
		System.out.println("Making noise...");
	}
	
	@Override
	public String toString() {
		return "Animal";
	}

}